﻿<html dir="LTR"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><title>FTPConnection.InvokeFTPCommand Method</title><xml></xml><link rel="stylesheet" type="text/css" href="MSDN.css"></head><body id="bodyID" class="dtBODY"><div id="nsbanner"><div id="bannerrow1"><table class="bannerparthead" cellspacing="0"><tr id="hdr"><td class="runninghead">An NDoc Documented Class Library</td><td class="product"></td></tr></table></div><div id="TitleRow"><h1 class="dtH1">FTPConnection.InvokeFTPCommand Method </h1></div></div><div id="nstext"><p>
            Invokes the given literal FTP command on the server.
            </p><div class="syntax">public virtual <a href="EnterpriseDT.Net.Ftp.FTPReply.html">FTPReply</a> InvokeFTPCommand(<br>   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> <i>command</i>,<br>   params <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string[]</a> <i>validCodes</i><br>);</div><h4 class="dtH4">Parameters</h4><dl><dt><i>command</i></dt><dd>Command to be sent.</dd><dt><i>validCodes</i></dt><dd>Valid return-codes (used for validating reply).</dd></dl><h4 class="dtH4">Return Value</h4><p>The reply returned by the server.</p><h4 class="dtH4">Remarks</h4><p>
            If a particular FTP command is not supported by <a href="EnterpriseDT.Net.Ftp.FTPConnection.html">FTPConnection</a>, this
            method may sometimes be used to invoke the command.  This will only work for 
            simple commands that don't require special processing.
            </p><p>
            An example of an FTP command that could be invoked using this method is the 
            <code>FEAT</code> command (which is actually behind the <a href="EnterpriseDT.Net.Ftp.FTPConnection.GetFeatures.html">GetFeatures</a> method.
            This would be done as follows:
            </p><pre class="code">
            	string features = ftpConnection.InvokeFTPCommand("FEAT", "211");
            </pre>
            The returned <code>string</code> could then be parsed to obtain the supported features
            of the server.
            <h4 class="dtH4">See Also</h4><p><a href="EnterpriseDT.Net.Ftp.FTPConnection.html">FTPConnection Class</a> | <a href="EnterpriseDT.Net.Ftp.html">EnterpriseDT.Net.Ftp Namespace</a></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="InvokeFTPCommand method"><param name="Keyword" value="InvokeFTPCommand method, FTPConnection class"><param name="Keyword" value="FTPConnection.InvokeFTPCommand method"></object></div></body></html>